<!--conf
<sample in_favorites="false">
              <product version="1.6" edition="pro"/>
                     <modifications>
                            <modified date="080424"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Paginal Output. Bricks Skin</title>
	<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.css">
	<link rel="STYLESHEET" type="text/css" href="../../codebase/ext/dhtmlxgrid_pgn_bricks.css">
	<script  src="../../codebase/dhtmlxcommon.js"></script>
	<script  src="../../codebase/dhtmlxgrid.js"></script>		
	<script  src="../../codebase/ext/dhtmlxgrid_pgn.js"></script>	
	<script  src="../../codebase/dhtmlxgridcell.js"></script>	
</head>

<script>
	function doOnLoad(){
		initGrid("1","modern");
		initGrid("2","light");
		initGrid("3","gray");
	}
	
	function initGrid(ind,skin){
		var mygrid = new dhtmlXGridObject('gridbox'+ind);
		mygrid.setImagePath("../../codebase/imgs/");
		mygrid.setHeader("Column A, Column B");
		mygrid.setInitWidths("100,250")
		mygrid.setColAlign("right,left")
		mygrid.setColTypes("ro,ed");
		mygrid.setColSorting("str,str")
		mygrid.enablePaging(true,10,3,"pagingArea"+ind,true);
		mygrid.setSkin(skin);
		mygrid.setPagingSkin("bricks");
		
		mygrid.init();
		mygrid.loadXML("smartrend.xml");
	}
	
</script>
<body onload="doOnLoad()">
<link rel='STYLESHEET' type='text/css' href='../common/style.css'>
<table cellspacing="0" cellpadding="0" class="sample_header" border="0">
	<tr valign="middle">
		<!-- COMPONENT ICON -->
		<td width="40" align="center"><img src="../common/dhtmlxgrid_icon.gif" border="0"></td>
		<!-- COMPONENT NAME -->
		<td width="150" align="left" nowrap="true">Sample: dhtmlxGrid</td>
		<!-- SAMPLE TITLE -->
		<td width="0" align="left" nowrap><b>Paginal Output. Bricks Skin</b></td>
		<!-- LINK TO COMPONENT PAGE -->
		<td width="0" align="right"><a href="http://www.dhtmlx.com/docs/products/dhtmlxGrid/index.shtml">dhtmlxGrid main page</a></td>
		<!-- CLOSE BUTTON -->
		<td width="50"><div class="sample_close"><a href="javascript:void(0);" onclick="self.close();"><img src="../common/sample_close.gif" width="14" height="14" border="0" alt="X"></a></div></td>
	</tr>
</table>
	
	
	<p>	
		You can use skin "bricks" (included in library by default) for paginal output. It has some variants of color schema which applied to grid skins automatically 
		
	</p>
	
	<table width="380">
		<tr>
			<td id="recinfoArea"></td>
		</tr>
		<tr>
			<td>
				<div id="gridbox1" width="100%" height="150px" style="background-color:white;overflow:hidden"></div>
				<div id="pagingArea1"></div>
				<br><br>
				<div id="gridbox2" width="100%" height="150px" style="background-color:white;overflow:hidden"></div>
				<div id="pagingArea2"></div>
				<br><br>
				<div id="gridbox3" width="100%" height="150px" style="background-color:white;overflow:hidden"></div>
				<div id="pagingArea3"></div>
			</td>
		</tr>
		<tr>
			<td id="pagingArea"></td>
		</tr>
	</table>
<br>
<div class='sample_code'><div class="hl-main"><pre><span class="hl-code"> 
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">STYLESHEET</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/ext/dhtmlxgrid_pgn_bricks.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">gridbox</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">width</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">100%</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">height</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">250px</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">background-color:white;overflow:hidden</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-code"> 
        </span><span class="hl-identifier">mygrid</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXGridObject</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">gridbox</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
        ...
        </span><span class="hl-comment">//</span><span class="hl-comment">should be called before init()</span><span class="hl-comment"></span><span class="hl-code">
        </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">enablePaging</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-number">10</span><span class="hl-code">,</span><span class="hl-number">3</span><span class="hl-code">,</span><span class="hl-quotes">&quot;</span><span class="hl-string">pagingArea</span><span class="hl-quotes">&quot;</span><span class="hl-code">,</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
        </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">setSkin</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">light</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
        </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">setPagingSkin</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">bricks</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
        ...
        </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">init</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
        </span><span class="hl-comment">//</span><span class="hl-comment">mygrid.setXMLAutoLoading(&quot;dynscroll.php&quot;);//optional. Use it if you want to load rows dynamicaly from time to time</span><span class="hl-comment"></span><span class="hl-code">
        </span><span class="hl-identifier">mygrid</span><span class="hl-code">.</span><span class="hl-identifier">loadXML</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">dynscroll.xml</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;</span><span class="hl-comment">//</span><span class="hl-comment">this sample uses static loading</span><span class="hl-comment"></span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span></pre></div></div>
		
		<strong>Parameters passed to enablePaging method:</strong>
			<li>true - means enable paginal output</li>
			<li>10 - number of rows per page</li>
			<li>3 - number of pages in group. You can set any number, but it is recommended to use smaller. There is also some auto-limits when using autoloading (grid will correct value automatically).</li>
			<li>"pagingArea" - ID of element where to append paging pannel to (where to show pages navigation)</li>
			<li>true - means that Records Info will be shown ("Results 11-40 from known 100")</li>
			
		


<!-- FOOTER -->
<table callspacing="0" cellpadding="0" border="0" class="sample_footer"><tr><td style="padding-left: 8px;">&copy; <a href="http://www.dhtmlx.com">DHTMLX LTD</a>. All rights reserved</td></tr></table>
<!-- FOOTER -->

</body>
</html>
